package com.yanqu.road.entity.activity.huashigang;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author wpj
 * @Date 2020/10/12
 */
@FieldTypeAnnotation(tableName = "t_c_huashigang_data")
public class HuaShiGangData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    int activityId;
    @FieldTypeAnnotation(desc = "模块数据")
    String modeData = "";
    @FieldTypeAnnotation(desc = "花石纲能力值数据")
    Map<Long, Long> abilityMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "总伤害值")
    long totalDamage;
    @FieldTypeAnnotation(desc = "生成boss的y值")
    List<Integer> bossYList = new ArrayList<>();

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }

    }

    public int getActivityId() {
        return activityId;
    }

    public String getModeData() {
        return modeData;
    }

    public void setModeData(String modeData) {
        if(null == modeData){
            return;
        }
        if(!this.modeData.equals(modeData)) {
            this.modeData = modeData;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, Long> getAbilityMap() {
        return abilityMap;
    }

    public void setAbilityMap(Map<Long, Long> abilityMap) {
        this.abilityMap = abilityMap;
    }

    public long getTotalDamage() {
        return totalDamage;
    }

    public void setTotalDamage(long totalDamage) {
        if (this.totalDamage != totalDamage) {
            this.totalDamage = totalDamage;
            setUpdateOption();
        }
    }

    public List<Integer> getBossYList() {
        return bossYList;
    }

    public void setBossYList(List<Integer> bossYList) {
        if (bossYList == null) {
            return;
        }
        this.bossYList = bossYList;
        setUpdateOption();
    }

}
